The present invention relates to the translation of a computer program source code file. In particular, it relates to isolating program translation failures to a small area of the program source code.
An application program can occupy hundreds of source code files consisting of thousands of lines of code. Translating such an application program may consume many hours of computer time. Translating includes any transformation of data from one form to another, such as compiling, assembling, or interpreting. After translating the program, an expert can expend many more hours studying the code to determine the source of any translation errors and modifying the code to eliminate those errors. Often, the application program is proprietary, and the experts at debugging translation errors are not employees of the application program owner. In this case, the application program owner is often reluctant to provide access to the proprietary program to the translation process expert, and instead provides the translation process expert with an abstracted description of the source code believed to cause the error. Unfortunately, this process is inefficient and expensive, since the expert suggests a solution, without examining the source code file, and the suggested solution often does not correct the problem.
Debugging translation errors in a large application program is also a very complicated process involving complex interactions between the application program and the translator. Application program experts often have difficulty isolating source code translation errors without assistance from experts in translator operation. This assistance is often provided for many weeks to debug a large application, and in the case of an application designed to operate on a new microprocessor, the assistance is often provided for many months. Unfortunately, translator experts are in short supply, so the development of many applications falls behind schedule.
For these and other reasons, there is a need for the present invention.
In some embodiments, a method comprises translating a source code file having a size and a plurality of bytes to obtain a translation error and reducing the size of the source code file by automatically identifying and removing at least one of the plurality of bytes that does not contribute to the translation error to obtain a test case file that is equivalent to the source code file.